<!-- This is to be deleted later maybe. And delete subsequent other if statements too --> 
<html>
  <head>
    <title>All Users in Database</title>
    <%= stylesheet_link_tag "recipe" %>
  </head>
  <h1>All Users in Database</h1><hr />

<table>
  <tr>
    <th>User name</th>
    <th>Password</th>
    <th>Email</th>
    <th>Region</th>
    <th>Birthday</th>
    <th>Admin</th>
  </tr>

<% for user in @users %>
  <tr>
    <td><%=h user.user_name %></td>
    <td><%=h user.password %></td>
    <td><%=h user.email %></td>
    <td><%=h user.region %></td>
    <td><%=h user.birthday %></td>
    <td><%=h user.admin %></td>
    <td><%= link_to 'Show', user %></td>
    <td><%= link_to 'Edit', edit_user_path(user) %></td>
    <td><%= link_to 'Destroy', user, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'Create User Account', new_user_path %>
<%= link_to "Logout", :controller=>"login", :action=> "index" %>
</html>
